/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package org.game.math.view.action;

import java.awt.Component;
import java.awt.Dialog;
import java.awt.event.ActionEvent;
import javax.swing.AbstractAction;
import javax.swing.SwingUtilities;

/**
 *
 * @author nmduc
 */
public class PreferenceCancelAction extends AbstractAction {

    @Override
    public void actionPerformed(ActionEvent ae) {
        Dialog dialog = (Dialog) SwingUtilities.getRoot((Component)ae.getSource());
        dialog.setVisible(false);
        dialog.dispose();
    }
}
